#encoding:utf-8
from django.utils.translation import ugettext as _
from django.db import models

class Address(models.Model):
    street = models.CharField(max_length=200)
    postal_code = models.CharField(max_length=5)
    city = models.CharField(max_length=60)
    country = models.ForeignKey('countries_states.Country')
    state = models.ForeignKey('countries_states.State', null=True, default=None, on_delete=models.SET(None))
    municipal = models.ForeignKey('countries_states.Municipal', null=True, default=None, on_delete=models.SET(None))
    last_modified = models.DateTimeField(
        verbose_name='Ultima modificación',
        auto_now=True
    )

    def __unicode__(self):
        return "%s, %s" %(self.street, self.city)

class Area(models.Model):
    name = models.CharField(max_length=150)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering=['name']


class Industry(models.Model):
    name = models.CharField(max_length=150)
    area = models.ForeignKey(Area)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering=['name']


class Degree(models.Model):
    name = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name


class Employment_Type(models.Model):
    name = models.CharField(max_length=50)

    def __unicode__(self):
        return self.name

class Gender(models.Model):
    name = models.CharField(max_length=20)

    def __unicode__(self):
        return self.name